MATCH_EQUIPMENT_BY_ID = "MATCH (e:Equipment {equipmentId: $equipmentId}) RETURN e"

GET_EQUIPMENT_TYPE_TREE = """
MATCH (t:EquipmentType) RETURN t.equipmentTypeId AS equipmentTypeId, t.equipmentTypeName AS equipmentTypeName, t.isMust AS isMust, t.icon AS icon, t.modelUrl AS modelUrl, t.parentId AS parentId, t.level AS level
"""

GET_EQUIPMENT_LIST = """
MATCH (e:Equipment)-[:EQUIPMENT_IS_TYPE_OF]->(t:EquipmentType)
{where}
RETURN e, t.equipmentTypeId AS equipmentTypeId
"""

CREATE_EQUIPMENT = """
CREATE (e:Equipment {
    equipmentId: $equipmentId,
    equipmentName: $equipmentName,
    status: $status,
    images: $images,
    specification: $specification,
    type: $type,
    position: $position,
    zindex: $zindex,
    scaling: $scaling,
    visibility: $visibility,
    createdBy: $createdBy,
    createdAt: $createdAt,
    updatedBy: $updatedBy,
    updatedAt: $updatedAt
})
RETURN e
"""

CREATE_EQUIPMENT_BENCH_REL = """
MATCH (b:WorkBench {benchId: $benchId}), (e:Equipment {equipmentId: $equipmentId})
MERGE (b)-[:HAS_EQUIPMENT]->(e)
"""

CREATE_EQUIPMENT_TYPE_REL = """
MATCH (et:EquipmentType {equipmentTypeId: $equipmentTypeId}), (e:Equipment {equipmentId: $equipmentId})
MERGE (e)-[:EQUIPMENT_IS_TYPE_OF]->(et)
"""

DELETE_EQUIPMENT = """
MATCH (e:Equipment {equipmentId: $equipmentId}) DETACH DELETE e
"""

CHECK_EQUIPMENT_EXISTS = "MATCH (e:Equipment {equipmentId: $equipmentId}) RETURN e"

# 可继续补充equipment相关Cypher语句 